package cloud.xiangyixiang.www.spring.boot.java.basics.enums;

import cloud.xiangyixiang.www.spring.boot.java.basics.interfaces.StudyInterface;

/**
 * <p>
 * 枚举类实现接口
 * </p>
 *
 * @author weixin
 * @date 2023/9/5 15:04
 */
public enum StudyEnum implements StudyInterface {

    /**
     * 枚举星期
     */
    SUNDAY(0,"星期日"),
    MONDAY(1,"星期一"),
    TUESDAY(2,"星期二"),
    WEDNESDAY(3,"星期三"),
    THURSDAY(4,"星期四"),
    FRIDAY(5,"星期五"),
    SATURDAY(6,"星期六");

    /**
     * 标识
     */
    private int id;

    /**
     * 含义
     */
    private String meaning;

    StudyEnum(int id, String meaning) {
        this.id = id;
        this.meaning = meaning;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMeaning() {
        return meaning;
    }

    public void setMeaning(String meaning) {
        this.meaning = meaning;
    }

    @Override
    public String toString() {
        return "Week{" +
                "id=" + id +
                ", meaning='" + meaning + '\'' +
                '}';
    }

    @Override
    public void studyJava() {
        System.out.println(this + "，学习java");
    }

    @Override
    public void studyDataStrucure() {
        System.out.println(this.meaning + "，学习数据结构");
    }

    @Override
    public void studyDesignMode() {
        System.out.println(this.meaning + "，学习设计模式");
    }

    @Override
    public void studySpringBoot() {
        System.out.println(this.meaning + "，学习SpringBoot框架");
    }

}
